<?php

class award extends Controller {

	function award()
	{
		parent::Controller();	
	}
	
	function index()
	{
		$this->load->model('studenthalloffamemodel');
		$data['hall'] = $this->studenthalloffamemodel->getTop();
		
		$this->load->library('pagination');

	    $per_page = 6;
   		$total = $this->studenthalloffamemodel->count_all();
   
   		$base_url = site_url('award/index/');
	    $config['base_url'] = $base_url;
	    $config['total_rows'] = $total;
	    $config['per_page'] = $per_page;
	    $config['uri_segment'] = '3';
	
	    $this->pagination->initialize($config); 
		
		$data['paging'] = str_replace('index.html/', 'index/', $this->pagination->create_links());
		
		$this->load->model('filemanagementmodel');
	    $data['header_tel'] = $this->filemanagementmodel->getByPostion('header_tel');
	    $data['footer_address'] = $this->filemanagementmodel->getByPostion('footer_add1');
		$data['students'] = $this->studenthalloffamemodel->getAllLimit($per_page, $this->uri->segment(3));
		
		$this->load->view('f_header', $data);
		$this->load->view('f_award', $data);
		$this->load->view('f_footer', $data);
	}
	
	
}

?>